#include <iostream>
#include <vector>

struct coord
{
	int x, y;
};

int const inf  = 1 << 27;
int const maxn = 107;
int n, m;

std::vector<coord> da(maxn);

int calc(int x, int y)
{
	int l = 1, r = 3000;
	while (l + 1 <= r) {
		int mid = (l + r) / 2;
		if (get_r(mid) > 0)
			r 
	}
}

int main()
{
	std::ios::sync_with_stdio(false);
	int T;
	std::cin >> T;
	while (T--) {
		std::cin >> n >> m;
		for (int i = 0; i < n; i++)
			std::cin >> da[i].x >> da[i].y;

		int ans = inf;
		for (int i = 0; i < n; i++)
			ans = std::min(ans, calc(da[i].x, da[i].y));
	}

}
